package com.chapter4.duotai.demo2;

//基类：单位
public class Unit {
    //生命值
    int HP;

    //攻击力
    int AP;

    //构造方法
    public Unit(int HP, int AP) {
        this.HP = HP;
        this.AP = AP;
    }

    public void move(){
        System.out.println("Unit move");
    }

    public void attack(){
        System.out.println("Unit attack");
    }
}
